﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MyIdeaEdit.ascx.cs" Inherits="Lenovo.CFI.Web.VP.MyIdea.MyIdeaEdit" %>
<%@ Register Src="../../UserControls/AsyncFileUpload.ascx" TagName="AsyncFileUpload" TagPrefix="afu" %>
<tbwc:StyleSheetControl ID="SscThis" runat="server" CssPath="VP/myidea/myideaedit.css"></tbwc:StyleSheetControl>
<ajaxToolkit:ToolkitScriptManager runat="Server" EnablePartialRendering="true" CombineScripts="false" ID="ScriptManager1" />

<script type="text/javascript">
    function PptFileUploadComplete(sender, args) {
        setTimeout("__doPostBack('<%= AfuFilePpt.UpdateUniqueID %>','')", 0);

        alert(args.get_fileName() + " upload successfully!");
    }

    function Pic1FileUploadComplete(sender, args) {
        setTimeout("__doPostBack('<%= AfuFilePic1.UpdateUniqueID %>','')", 0);

        alert(args.get_fileName() + " upload successfully!");
    }
    function Pic2FileUploadComplete(sender, args) {
        setTimeout("__doPostBack('<%= AfuFilePic2.UpdateUniqueID %>','')", 0);

        alert(args.get_fileName() + " upload successfully!");
    } function Pic3FileUploadComplete(sender, args) {
        setTimeout("__doPostBack('<%= AfuFilePic3.UpdateUniqueID %>','')", 0);

        alert(args.get_fileName() + " upload successfully!");
    }

</script>
<div class="wrapper">
    <tbwc:Fieldset ID="FsIdea" runat="server" DesignWidth="1240px" CssClass="idea" GroupingText="Idea Content">
        <div class="line"><asp:Label ID="LblTopic" runat="server" AssociatedControlID="TxtTopic" Text="Topic:" CssClass="title"></asp:Label><asp:Label 
            ID="TxtTopic" runat="server" CssClass="readvalue"></asp:Label></div>
        
        <div class="line"><asp:Label ID="LblTitle" runat="server" AssociatedControlID="TxtTitle" Text="Name:" CssClass="title"></asp:Label><asp:TextBox
            ID="TxtTitle" MaxLength="200" runat="server" Width="44.5em"></asp:TextBox><span class="hint"><asp:RequiredFieldValidator
            ID="RfvTitle" runat="server" ControlToValidate="TxtTitle" ErrorMessage="Required" Display="Dynamic"></asp:RequiredFieldValidator></span></div>
        
        <div class="line"><asp:Label ID="LblIdeaType" runat="server" AssociatedControlID="DdlIdeaType" Text="Type:" CssClass="title"></asp:Label><asp:DropDownList 
            ID="DdlIdeaType" runat="server" Width="16em"></asp:DropDownList><span class="hint"><asp:CompareValidator
            ID="CvDdlIdeaType" runat="server" ControlToValidate="DdlIdeaType" ErrorMessage="Required" Display="Dynamic" ValueToCompare="-1" Operator="NotEqual"></asp:CompareValidator></span></div>
        
        <div class="line"><asp:Label ID="LblRelatedType" runat="server" AssociatedControlID="CbRelatedType" Text="Related Type:" CssClass="title"></asp:Label><asp:CheckBoxList
            ID="CbRelatedType" runat="server" RepeatLayout="Table" RepeatDirection="Horizontal" style="display:inline-block"></asp:CheckBoxList>
        </div>

        <div class="line"><asp:Label ID="Label4" runat="server" AssociatedControlID="DdlKeyword1" Text="Keywords:" CssClass="title"></asp:Label><asp:DropDownList 
            ID="DdlKeyword1" runat="server" Width="10em"></asp:DropDownList><asp:DropDownList 
            ID="DdlKeyword2" runat="server" Width="10em"></asp:DropDownList><asp:DropDownList 
            ID="DdlKeyword3" runat="server" Width="10em"></asp:DropDownList>
            <asp:TextBox ID="TxtFreeKeyword" runat="server" Width="6em"></asp:TextBox>
        </div>

        <div class="line"><asp:Label ID="LblBackground" runat="server" AssociatedControlID="TxtBackground" Text="Background:" CssClass="title"></asp:Label><asp:TextBox
            ID="TxtBackground" runat="server" TextMode="MultiLine" Rows="3" Width="40em"></asp:TextBox></div>

        <div class="line"><asp:Label ID="LblDescription" runat="server" AssociatedControlID="TxtDescription" Text="Description:" CssClass="title"></asp:Label><asp:TextBox
            ID="TxtDescription" runat="server" TextMode="MultiLine" Rows="3" Width="40em"></asp:TextBox></div>

        <div class="line"><asp:Label ID="LblValue" runat="server" AssociatedControlID="TxtValue" Text="Value:" CssClass="title"></asp:Label><asp:TextBox
            ID="TxtValue" runat="server" TextMode="MultiLine" Rows="3" Width="40em"></asp:TextBox></div>

        <div class="line"><asp:Label ID="LblFilePpt" runat="server" AssociatedControlID="AfuFilePpt" Text="PPT:" CssClass="title"></asp:Label><afu:AsyncFileUpload 
            ID="AfuFilePpt" runat="server" CssClass="afu" Width="25em" ShowFileLink="true" RenderMode="Inline" HintVisible="false"
                OnClientUploadComplete="PptFileUploadComplete" /></div>

        <div class="line"><asp:Label ID="LblFilePic1" runat="server" AssociatedControlID="AfuFilePic1" Text="Pic1:" CssClass="title"></asp:Label><afu:AsyncFileUpload 
            ID="AfuFilePic1" runat="server" CssClass="afu" Width="25em" ShowFileLink="true" RenderMode="Inline" HintVisible="false"
                OnClientUploadComplete="Pic1FileUploadComplete" /></div>

        <div class="line"><asp:Label ID="LblFilePic2" runat="server" AssociatedControlID="AfuFilePic2" Text="Pic2:" CssClass="title"></asp:Label><afu:AsyncFileUpload 
            ID="AfuFilePic2" runat="server" CssClass="afu" Width="25em" ShowFileLink="true" RenderMode="Inline" HintVisible="false"
                OnClientUploadComplete="Pic2FileUploadComplete" /></div>

        <div class="line"><asp:Label ID="LblFilePic3" runat="server" AssociatedControlID="AfuFilePic3" Text="Pic3:" CssClass="title"></asp:Label><afu:AsyncFileUpload 
            ID="AfuFilePic3" runat="server" CssClass="afu" Width="25em" ShowFileLink="true" RenderMode="Inline" HintVisible="false"
                OnClientUploadComplete="Pic3FileUploadComplete" /></div>

        <div class="line"><asp:Label ID="LblOwner" runat="server" AssociatedControlID="TxtOwner" Text="Owner:" CssClass="title"></asp:Label><asp:Label 
            ID="TxtOwner" runat="server" CssClass="readvalue"></asp:Label></div>

        <div class="line"><asp:Label ID="LblApprover" runat="server" AssociatedControlID="DdlApprover" Text="Approver:" CssClass="title"></asp:Label><asp:DropDownList 
            ID="DdlApprover" runat="server" Width="20em"></asp:DropDownList>
        </div>
    </tbwc:Fieldset>    
    <div class="operation" style="padding:8px 0px 8px 16em"><asp:Button 
        ID="BtnSubmit" runat="server" CssClass="primary" Text="Submit" OnClick="BtnSubmit_Click" /><asp:LinkButton
        ID="BtnSave" runat="server" Text="Save" SkinID="EditSecondary" OnClick="BtnSave_Click"></asp:LinkButton></div>
</div>
